#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2024-05-21 11:28
# @Author  : nedncs
# @File    : ldap.py
# @Description : tests
import testConfig
from core import ldap

# l = LDAP()
# l.setBaseDn('ou=yxxglass,ou=com')

attrs = ['uid', 'sn', 'mail', 'userpassword', 'givenName']
# user = l.conn.search('ou=people,dc=yxxglass,dc=com', '(uid=18974776062)', attributes=attrs)
# 获取搜索结果
# entries = l.conn.entries
# print(user, entries)
# l.setuserBaseDn('ou=people,dc=yxxglass,dc=com')
# ldap.ldap_auth('18974776062', 'abcd123456')
ldap.auth_change_password('18974776062', '12')
